home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 5 / Amiga Plus Sonderheft 1996 #5.iso / sonstiges / picview20 / install < prev    next >
Text File  |  1986-06-06  |  7KB  |  284 lines

  1.  
  2. (SET @default-dest "Work:")
  3. (SET default_lang 0)
  4.  
  5. ; ***** english texts *****
  6.  
  7. (SET #needKick (CAT "\nPicView need Kickstart Version 39 at least." ) )
  8.  
  9. (SET #startMsg (CAT "\nWelcom to PicView 2.00 !\n\n"
  10.                      "This script installs PicView on your AMIGA.\n\n") )
  11.  
  12. (SET #destPrompt ( CAT "Please choose the destination directory for PicView.\n"
  13.                        "No extra directory will be created." ) )
  14.  
  15. (SET #copyPFiles "Copying program files")
  16.  
  17. (SET #langPrompt "Select the languages you wish to use with PicView.")
  18.  
  19. (SET #DocPrompt "Select the directory for the documentation file.")
  20.  
  21. (SET #RexxPrompt "Select the ARexx scripts you wish to install." )
  22.  
  23. (SET #IconPrompt "Select an icon set for PicView.")
  24.  
  25. (SET #NormalIcon "Normal WB Icons (4 Colors)" )
  26.  
  27. (SET #MWBIcon "Magic WB Icons (8 Colors)" )
  28.  
  29. (SET #KeyPrompt "Select the directory for the key file.")
  30.  
  31. (SET #exitMsg (CAT "Much fun with PicView 2.00 wish you\n\n"
  32.                    "Holger Papajewski" ) )
  33.  
  34.  
  35. ; ***** german texts *****
  36.  
  37. (IF (= @language "deutsch")
  38. (
  39. (SET default_lang 1)
  40.  
  41. (SET #needKick ( CAT "\nPicView benötigt mindestens die Kickstart-Version 39." ) )
  42.  
  43. (SET #startMsg (CAT "\nWillkommen bei PicView 2.00 !\n\n"
  44.                      "Diese Datei installiert PicView auf ihrem AMIGA.\n\n") )
  45.  
  46. (SET #destPrompt (CAT "Wählen Sie bitte das Zielverzeichnis für PicView.\n"
  47.                       "Es wird kein extra Verzeichnis erzeugt.") )
  48.  
  49. (SET #copyPFiles "Kopiere Programmdateien")
  50.  
  51. (SET #langPrompt "Wählen Sie die Sprachen, die Sie mit PicView benutzen wollen.")
  52.  
  53. (SET #DocPrompt "Wählen Sie ein Verzeichnis, in welches die Dokumentation kopiert werden soll.")
  54.  
  55. (SET #RexxPrompt "Wählen Sie die ARexx-Programme, die installiert werden sollen." )
  56.  
  57. (SET #IconPrompt "Wählen Sie die Art der Piktogramme für PicView." )
  58.  
  59. (SET #NormalIcon "Normale WB Piktorgramme (4 Farben)" )
  60.  
  61. (SET #MWBIcon "MagicWB Piktogramme (8 Farben)" )
  62.  
  63. (SET #KeyPrompt "Wählen Sei das Verzeichnis, in welches das Key-File kopiert werden soll.")
  64.  
  65. (SET #exitMsg (CAT "Viel Spaß mit PicView 2.00 wünscht\n\n"
  66.                    "Holger Papajewski" ) )
  67. )
  68. )
  69.  
  70. ; ***** start installation *****
  71.  
  72. (if (< (/ (GETVERSION) 65536) 39)
  73.     (ABORT #needKick)
  74. )
  75.  
  76. (MESSAGE #startMsg)
  77.  
  78. ; ***** get dest dir for PicView *****
  79.  
  80. (SET @default-dest
  81.     (ASKDIR (PROMPT  #destPrompt)
  82.             (HELP    askdir-help)
  83.             (DEFAULT @default-dest )))
  84.  
  85. (COPYFILES (SOURCE "PicView")
  86.            (HELP copyfiles-help)
  87.            (DEST @default-dest )
  88. )
  89.  
  90. ; ***** install some languages *****
  91.  
  92. (SET sprachen (ASKOPTIONS (PROMPT #langPrompt)
  93.                           (HELP   askoptions-help)
  94.                           (CHOICES "english"
  95.                                    "deutsch"
  96.                                    "dansk"
  97.                                    "norsk"
  98.                                    "français"
  99.                           )
  100.                           (DEFAULT (+ default_lang 1) )
  101.               )
  102. )
  103.  
  104. (if (IN sprachen 1)
  105.     (COPYFILES (SOURCE "Locale/deutsch/PicView.catalog")
  106.                (DEST "Locale:Catalogs/deutsch") )
  107. )
  108.  
  109. (if (IN sprachen 2)
  110.     (COPYFILES (SOURCE "Locale/dansk/PicView.catalog")
  111.                (DEST "Locale:Catalogs/dansk") )
  112. )
  113.  
  114. (if (IN sprachen 3)
  115.     (COPYFILES (SOURCE "Locale/norsk/PicView.catalog")
  116.                (DEST "Locale:Catalogs/norsk") )
  117. )
  118.  
  119. (if (IN sprachen 4)
  120.     (COPYFILES (SOURCE "Locale/français/PicView.catalog")
  121.                (DEST "Locale:Catalogs/français") )
  122. )
  123.  
  124. ; ***** get dest for doc files *****
  125.  
  126. (SET @DocDir
  127.     (ASKDIR (PROMPT  #DocPrompt)
  128.             (HELP    askdir-help)
  129.             (DEFAULT @default-dest)
  130.             (NEWPATH)
  131.     )
  132. )
  133.  
  134. ; ***** install doc files *****
  135. (SET OForm "Orderform")
  136. (SET AFD   "AFD-COPYRIGHT")
  137.  
  138. (if (= @language "english")
  139.   (SET SDocDir  "Docs/english")
  140. )
  141.   
  142. (if (= @language "deutsch")
  143.   (
  144.     (SET OForm   "Registrierung")
  145.     (SET AFD     "AFD-COPYRIGHT.de")
  146.     (SET SDocDir "Docs/deutsch")
  147.   )
  148. )
  149.  
  150. (COPYFILES (SOURCE  SDocDir)
  151.            (DEST    @DocDir)
  152.            (CHOICES "PicView.guide" "ReadMe.mui" OForm AFD)
  153. )
  154.  
  155. ; ***** install ARexx scripts *****
  156.  
  157. (SET PVrexx (ASKOPTIONS (PROMPT #RexxPrompt)
  158.                           (HELP   askoptions-help)
  159.                           (CHOICES "MakeAscii.rexx" "MakeGuide.rexx"
  160.                                    "SlideShow.rexx" "TestExists.rexx" )
  161.                           (DEFAULT 15 )
  162.           )
  163. )
  164.  
  165. (IF (IN PVrexx 1)
  166.   (COPYFILES (SOURCE "rexx/MakeAscii.rexx")
  167.              (DEST   "Rexx:")
  168.   )
  169. )
  170.  
  171. (IF (IN PVrexx 2)
  172.   (COPYFILES (SOURCE "rexx/MakeGuide.rexx")
  173.              (DEST   "Rexx:")
  174.   )
  175. )
  176.  
  177. (IF (IN PVrexx 3)
  178.   (COPYFILES (SOURCE "rexx/SlideShow.rexx")
  179.              (DEST   "Rexx:")
  180.   )
  181. )
  182.  
  183. (IF (IN PVrexx 4)
  184.   (COPYFILES (SOURCE "rexx/TestExists.rexx")
  185.              (DEST   "Rexx:")
  186.   )
  187. )
  188.  
  189. ; ***** install icon set *****
  190.  
  191. (SET iconSet (ASKCHOICE (PROMPT  #IconPrompt)
  192.                         (HELP    askchoice-help)
  193.                         (CHOICES #NormalIcon #MWBIcon)
  194.                         (DEFAULT 0)
  195.              )
  196. )
  197.  
  198. (IF (= IconSet 1)
  199.   (
  200.     (COPYFILES (SOURCE "MWB/PicView.info")
  201.                (DEST   @default-dest )
  202.     )
  203.     (COPYFILES (SOURCE  "MWB/guide.info")
  204.                (DEST    @DocDir)
  205.                (NEWNAME "PicView.guide.info")
  206.     )
  207.     (COPYFILES (SOURCE  "MWB/txt.info")
  208.                (DEST    @DocDir)
  209.                (NEWNAME (CAT OForm ".info"))
  210.     )
  211.   )
  212.   ;*** else ***
  213.   (
  214.     (COPYFILES (SOURCE "PicView.info")
  215.                (DEST   @default-dest)
  216.     )
  217.     (COPYFILES (SOURCE  SDocDir)
  218.                (DEST    @DocDir)
  219.                (PATTERN "#?.info")
  220.     )
  221.   )
  222. )
  223.  
  224. (TOOLTYPE (DEST     (TACKON @default-dest "PicView"))
  225.           (SETSTACK 8192)
  226.           (NOPOSITION)
  227. )
  228. (TOOLTYPE (DEST     (TACKON @DocDir "PicView.guide"))
  229.           (NOPOSITION)
  230. )
  231. (TOOLTYPE (DEST     (TACKON @DocDir OForm))
  232.           (NOPOSITION)
  233. )
  234.  
  235. ; ***** check for key file and copy it *****
  236.  
  237. (SET @keyFile "Key/PicView.key")
  238. (SET key( EXISTS @keyFile (NOREQ)))
  239.  
  240. (IF (= key 1)
  241.   (
  242.     (SET ENVexists (EXISTS "ENV:KEYPATH" ))
  243.     (IF (= ENVexists 1)
  244.       (
  245.         (SET KeyPathENV (GETENV "KEYPATH" ))
  246.         (SET ENV-choice (CAT "KEYPATH - " KeyPathENV ))
  247.         (SET KeyDest (ASKCHOICE (PROMPT  #KeyPrompt)
  248.                                 (HELP    askchoice-help)
  249.                                 (CHOICES @default-dest "S:" ENV-choice)
  250.                                 (DEFAULT 0)))
  251.       )
  252.       ; ***** no KEYPATH var found *****
  253.       (
  254.         (SET KeyDest (ASKCHOICE (PROMPT  #KeyPrompt)
  255.                                 (HELP    askchoice-help)
  256.                                 (CHOICES @default-dest "S:")
  257.                                 (DEFAULT 0)))
  258.       )
  259.     )
  260.  
  261.     (IF (= KeyDest 0)
  262.       (COPYFILES (SOURCE @keyFile)
  263.                  (DEST   @default-dest)
  264.       )
  265.     )
  266.  
  267.     (IF (= KeyDest 1)
  268.       (COPYFILES (SOURCE @keyFile)
  269.                  (DEST   "S:")
  270.       )
  271.     )
  272.  
  273.     (IF (= KeyDest 2)
  274.       (COPYFILES (SOURCE @keyFile)
  275.                  (DEST   KeyPathENV)
  276.       )
  277.     )
  278.   )
  279. )
  280.  
  281. (EXIT #exitMsg )
  282.  
  283.  
  284.